package exportedlibrary;

import java.io.IOException;
import java.net.MalformedURLException;

import com.example.social.me.project.R;
import com.skp.openplatform.android.sdk.api.APIRequest;
import com.skp.openplatform.android.sdk.common.RequestBundle;
import com.skp.openplatform.android.sdk.common.RequestListener;
import com.skp.openplatform.android.sdk.common.ResponseMessage;
import com.skp.openplatform.android.sdk.oauth.Constants.CONTENT_TYPE;
import com.skp.openplatform.android.sdk.oauth.Constants.HttpMethod;
import com.skp.openplatform.android.sdk.oauth.OAuthInfoManager;
import com.skp.openplatform.android.sdk.oauth.OAuthListener;
import com.skp.openplatform.android.sdk.oauth.SKPOPException;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class Planet_X extends Activity{

	static OAuthInfoManager oAuth = new OAuthInfoManager("6a649faa-b1b1-3bb9-925f-e04556cae6c2");
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_author);
		
		
			try {
				OAuthInfoManager.login(this, new OAuthListener(){

					public void onComplete(String arg0) {
						
					
					}

					public void onError(String arg0) {
						// TODO Auto-generated method stub
						
					}
					
				});
			} catch (SKPOPException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
	
		
		APIRequest api = new APIRequest();
		RequestListener listener = new RequestListener(){
			
			public void onSKPOPException(SKPOPException e) {
			    setResult(1);
			}
			 
			
			public void onMalformedURLException(MalformedURLException e) {
			    setResult(1);
			}
			 
			public void onIOException(IOException e) {
			    setResult(1);
			}
			 
			public void onComplete(ResponseMessage response) {
			    setResult(1);
			}
		};
		RequestBundle reqBundle = new RequestBundle();
		reqBundle.setUrl("https://apis.skplanetx.com/nateon/getProfile");
		reqBundle.setHttpMethod(HttpMethod.GET);
		reqBundle.setResponseType(CONTENT_TYPE.JSON);
		 
		
	}

}
